USE [CTEM-DB-v1]
GO

/****** Object:  StoredProcedure [dbo].[Ledger_Update]    Script Date: 02/10/2012 11:18:13 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO



-- =============================================
-- Author:		TienDH
-- Create date: 12/05/2011
-- Description:	Get full employee's information
-- =============================================
CREATE PROCEDURE [dbo].[Ledger_Update]
	@LedgerID           bigint,
	@Name				nvarchar(MAX),
	@Type				nvarchar(MAX),
	@Kind				bigint,
	@Number				bigint,
	@Person				nvarchar(MAX),
	@Reason				nvarchar(MAX),
	@Method				nvarchar(MAX),
	@Date			    DATETIME,
	@FromAcc            nvarchar(MAX),
	@FromNum			nvarchar(MAX),
	@ToAcc				nvarchar(MAX),
	@ToNum				nvarchar(MAX),
	@FromBank           nvarchar(MAX),
	@ToBank             nvarchar(MAX),
	@Sender             nvarchar(MAX),
	@Taker              nvarchar(MAX),
	@SendDate           nvarchar(MAX)
AS
BEGIN
	UPDATE Ledger
	SET Name = @Name,
	    Type = @Type,
	    Kind = @Kind,
	    Number = @Number,
	    Person = @Person,
	    Reason = @Reason,
	    Method = @Method,
	    Date = @Date,
	    FromAcc = @FromAcc,
	    FromNum = @FromNum,
	    ToAcc=@ToAcc,
	    ToNum = @ToNum,
	    FromBank = @FromBank,
	    ToBank = @ToBank,
	    Sender = @Sender,
	    Taker = @Taker,
	    SendDate = @SendDate
	 WHERE LedgerID = @LedgerID   
	
END



GO

